.DEFAULT_GOAL = build
test:
	# FAILED: whatever I do care :), haha
	go test src/fy_support_source/*.go

build:
	# go mod download
	go mod tidy
	# go vet
	go build -o fy -tags="release" src/cmd/*.go
	# strip -S -s -x fy

run:
	export t="suck my dick"
	go run src/cmd/fy.go $(t)

test-static-build:
	# find the glib.a path, not sure ?
	go build -ldflags '-s -w -L /lib/glib -linkmode "external" -extflags "-static"' 

fake-install:
	@echo "DOCS   ===================================="
	@echo "[INFO] you can install fy to /usr/local/bin"
	@echo "[INFO] by run ./shell-scripts/install-to-system.sh"

install:
	@echo "this will install to /usr/local/bin/{fy, fy-file}"
	@sudo mv fy-file /usr/local/bin/fy-file
	@sudo mv fy /usr/local/bin/fy

uninstall:
	@sudo rm -rf /usr/local/bin/{fy-file, fy}

dist-with-goreleaser:
	goreleaser --snapshot --clean

clean:
	rm -rf fy dist
